import { IProductDetail } from "../../typings";
import { IModalUsers, IModalCoupons, IModalUserCoupons, IModalMemberLevels } from "../../typings/types/cloud-models";

// 初始化数据模型客户端
const models = wx.cloud.models;

const getUserInfo = async (openId: string, phone: string) => {
  const user = (await models.users.get({
    filter: {
      where: {
        _openid: {
          $eq: openId
        },
        phone: phone && phone.length > 0 ? {
          $eq: phone
        } : {}
      }
    }
  })).data
  if (!user)return undefined;
  
}

export {
  getUserInfo
}